package com.oneguy.control.queue;

import java.util.PriorityQueue;

public class Message implements Comparable<Message> {
	public int what;
	public Object obj;
	public int arg1;

	public int arg2;

	public long when;

	@Override
	public int compareTo(Message o) {
		if (o == null) {
			return 1;
		}
		if (when < o.when) {
			return -1;
		} else {
			return 1;
		}
	}

	public long getWhen() {
		return when;
	}

	public void setWhen(long when) {
		this.when = when;
	}
}
